package com.yb.xczx.cloud.media.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yb.core.constant.JSONUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 媒资信息
 * </p>
 *
 * @author 姚兵
 * @since 2023-05-09
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("media_files")
@ApiModel(value = "MediaFiles对象", description = "媒资信息")
@ToString
public class MediaFiles {

    @ApiModelProperty("文件id,md5值")
    @TableId("id")
    private String id;

    @ApiModelProperty("机构ID")
    @TableField("company_id")
    private Long companyId;

    @ApiModelProperty("机构名称")
    @TableField("company_name")
    private String companyName;

    @ApiModelProperty("文件名称")
    @TableField("filename")
    private String filename;

    @ApiModelProperty("文件类型（图片、文档，视频）")
    @TableField("file_type")
    private String fileType;

    @ApiModelProperty("标签")
    @TableField("tags")
    private String tags;

    @ApiModelProperty("存储目录")
    @TableField("bucket")
    private String bucket;

    @ApiModelProperty("存储路径")
    @TableField("file_path")
    private String filePath;

    @ApiModelProperty("文件id")
    @TableField("file_id")
    private String fileId;

    @ApiModelProperty("媒资文件访问地址")
    @TableField("url")
    private String url;

    @ApiModelProperty("上传人")
    @TableField("username")
    private String username;

    @ApiModelProperty("上传时间")
    @TableField("create_date")
    @DateTimeFormat(pattern = JSONUtil.DATE_TIME_FORMAT)
    @JsonFormat(pattern = JSONUtil.DATE_TIME_FORMAT,timezone="GMT+8")
    private LocalDateTime createDate;

    @ApiModelProperty("修改时间")
    @TableField("change_date")
    @DateTimeFormat(pattern = JSONUtil.DATE_TIME_FORMAT)
    @JsonFormat(pattern = JSONUtil.DATE_TIME_FORMAT,timezone="GMT+8")
    private LocalDateTime changeDate;

    @ApiModelProperty("状态,1:正常，0:不展示")
    @TableField("status")
    private String status;

    @ApiModelProperty("备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty("审核状态")
    @TableField("audit_status")
    private String auditStatus;

    @ApiModelProperty("审核意见")
    @TableField("audit_mind")
    private String auditMind;

    @ApiModelProperty("文件大小")
    @TableField("file_size")
    private Long fileSize;


}
